package service;

import java.util.List;

import models.LendCard;
import models.LendCardF;

public class LendCardService {

	//获取当前金额的等级
	public static LendCardF getLevel(Double money){
		System.out.println(money+"--------------------------------");
		List<LendCardF>  d = LendCardF.find(" money <= ? order by money desc", money).fetch();
		return d.size() > 0 ? d.get(0) : null;
	}
	
	public static LendCard getmoney(String lennum){
		System.out.println(lennum+"----------------------------------------------");
		LendCard lendcard = null ;
		lendcard = LendCard.find("from LendCard where lecnum = ? ",lennum).first();
		return lendcard ;
	}
	
}
